﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using CashFlow.ShopManage.Def;
using CashFlow.Db.Entity;

namespace CashFlow.ShopManage.Service
{
    public interface IOrderService : IService<OrderEntity>
    {
        IList<OrderBuySellInfo> QueryShopAllUsersOrder(int shopManagerUserId
            , string orderNo
            , string date
            , int? state
            , string buyer
            , string seller);

        IList<OrderAndUserInfo> QueryShopAllUsersOrder2(int shopManagerUserId
            , string date);

        bool IsExistOrderIdInShop(int shopManagerUserId, int orderId, string date);

        ECreateOrderResult AddOrder(int buyerUserId
            , int sellerUserId
            , decimal amount);

        bool ReleaseOrder(string date);

        EUpdateOrderResult UpdateOrder(int orderId
            , int buyerUserId
            , int sellerUserId
            , decimal amount
            , string date);
    }
}
